package com.ln.aop01.controller;

import com.ln.aop01.annotation.MyPermission;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Ln
 * @version 终极版
 * @date 2022/11/12 15:57
 */
@RestController
@RequestMapping("/annotation")
public class AnnotationController {
    @PostMapping("/list")
    @MyPermission("list")
    public String list(){
        System.out.println("查询");
        return "list";
    }

    @PostMapping("/add")
    @MyPermission("add")
    public String add(){
        System.out.println("添加");
        return "add";
    }
}
